package com.jvmmonitor.model;

/**
 * 内存统计数据模型
 */
public class MemoryStats {
    // 堆内存统计
    private long heapMemoryUsed;
    private long heapMemoryMax;
    private long heapMemoryCommitted;
    
    // 非堆内存统计
    private long nonHeapMemoryUsed;
    private long nonHeapMemoryMax;
    private long nonHeapMemoryCommitted;
    
    // 元空间统计
    private long metaspaceUsed;
    private long metaspaceMax;
    private long metaspaceCommitted;
    
    // 直接内存统计
    private long directMemoryUsed;
    
    // 代码缓存统计
    private long codeCacheUsed;
    private long codeCacheMax;
    private long codeCacheCommitted;
    
    // 时间戳
    private long timestamp;
    
    // Getters and Setters
    public long getHeapMemoryUsed() {
        return heapMemoryUsed;
    }
    
    public void setHeapMemoryUsed(long heapMemoryUsed) {
        this.heapMemoryUsed = heapMemoryUsed;
    }
    
    public long getHeapMemoryMax() {
        return heapMemoryMax;
    }
    
    public void setHeapMemoryMax(long heapMemoryMax) {
        this.heapMemoryMax = heapMemoryMax;
    }
    
    public long getHeapMemoryCommitted() {
        return heapMemoryCommitted;
    }
    
    public void setHeapMemoryCommitted(long heapMemoryCommitted) {
        this.heapMemoryCommitted = heapMemoryCommitted;
    }
    
    public long getNonHeapMemoryUsed() {
        return nonHeapMemoryUsed;
    }
    
    public void setNonHeapMemoryUsed(long nonHeapMemoryUsed) {
        this.nonHeapMemoryUsed = nonHeapMemoryUsed;
    }
    
    public long getNonHeapMemoryMax() {
        return nonHeapMemoryMax;
    }
    
    public void setNonHeapMemoryMax(long nonHeapMemoryMax) {
        this.nonHeapMemoryMax = nonHeapMemoryMax;
    }
    
    public long getNonHeapMemoryCommitted() {
        return nonHeapMemoryCommitted;
    }
    
    public void setNonHeapMemoryCommitted(long nonHeapMemoryCommitted) {
        this.nonHeapMemoryCommitted = nonHeapMemoryCommitted;
    }
    
    public long getMetaspaceUsed() {
        return metaspaceUsed;
    }
    
    public void setMetaspaceUsed(long metaspaceUsed) {
        this.metaspaceUsed = metaspaceUsed;
    }
    
    public long getMetaspaceMax() {
        return metaspaceMax;
    }
    
    public void setMetaspaceMax(long metaspaceMax) {
        this.metaspaceMax = metaspaceMax;
    }
    
    public long getMetaspaceCommitted() {
        return metaspaceCommitted;
    }
    
    public void setMetaspaceCommitted(long metaspaceCommitted) {
        this.metaspaceCommitted = metaspaceCommitted;
    }
    
    public long getDirectMemoryUsed() {
        return directMemoryUsed;
    }
    
    public void setDirectMemoryUsed(long directMemoryUsed) {
        this.directMemoryUsed = directMemoryUsed;
    }
    
    public long getCodeCacheUsed() {
        return codeCacheUsed;
    }
    
    public void setCodeCacheUsed(long codeCacheUsed) {
        this.codeCacheUsed = codeCacheUsed;
    }
    
    public long getCodeCacheMax() {
        return codeCacheMax;
    }
    
    public void setCodeCacheMax(long codeCacheMax) {
        this.codeCacheMax = codeCacheMax;
    }
    
    public long getCodeCacheCommitted() {
        return codeCacheCommitted;
    }
    
    public void setCodeCacheCommitted(long codeCacheCommitted) {
        this.codeCacheCommitted = codeCacheCommitted;
    }
    
    public long getTimestamp() {
        return timestamp;
    }
    
    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
    
    @Override
    public String toString() {
        return "MemoryStats{" +
                "heapMemoryUsed=" + heapMemoryUsed +
                ", heapMemoryMax=" + heapMemoryMax +
                ", heapMemoryCommitted=" + heapMemoryCommitted +
                ", nonHeapMemoryUsed=" + nonHeapMemoryUsed +
                ", nonHeapMemoryMax=" + nonHeapMemoryMax +
                ", nonHeapMemoryCommitted=" + nonHeapMemoryCommitted +
                ", metaspaceUsed=" + metaspaceUsed +
                ", metaspaceMax=" + metaspaceMax +
                ", metaspaceCommitted=" + metaspaceCommitted +
                ", directMemoryUsed=" + directMemoryUsed +
                ", codeCacheUsed=" + codeCacheUsed +
                ", codeCacheMax=" + codeCacheMax +
                ", codeCacheCommitted=" + codeCacheCommitted +
                ", timestamp=" + timestamp +
                '}';
    }
}